<?php

namespace app\web\model;
use think\Model;
/**

 */
class Attach extends Model{
    // 开启自动写入时间戳字段
    //protected $autoWriteTimestamp = true;
	protected $insert = ['uid','count','time'];

	protected function setUidAttr(){
		return session('user_auth')['uid'];
	}
	protected function setCountAttr(){
		return 0;
	}
	protected function setTimeAttr(){
		return time();
	}

    //获取器
    public function getTimeAttr($value)
    {
        return  wordTime($value);
    }

}
